<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/q_canshu/q_canshu.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/q_canshu/q_canshu.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '系统参数设置',
                name: 'q_canshu/q_canshu',
                url: "/q_canshu/",
                sortName: "cs_name"
            });
            const editFormFields = ref({"cs_class":"","cs_name":"","cs_value":"","cs_Remark":""});
            const editFormOptions = ref([[{"dataKey":"系统参数分类","data":[],"title":"参数分类","required":true,"field":"cs_class","type":"select"}],
                              [{"title":"参数名称","required":true,"field":"cs_name","type":"text"}],
                              [{"title":"参数值","required":true,"field":"cs_value","type":"text"}],
                              [{"title":"参数说明","field":"cs_Remark","type":"textarea"}]]);
            const searchFormFields = ref({"cs_class":"","cs_name":""});
            const searchFormOptions = ref([[{"title":"参数名称","field":"cs_name","type":"like"},{"dataKey":"系统参数分类","data":[],"title":"参数分类","field":"cs_class","type":"select"}]]);
            const columns = ref([{field:'ID',title:'ID',type:'int',sort:true,width:110,readonly:true,require:true,align:'left',sort:true},
                       {field:'cs_class',title:'参数分类',type:'int',bind:{ key:'系统参数分类',data:[]},width:110,require:true,align:'left'},
                       {field:'cs_name',title:'参数名称',type:'string',link:true,sort:true,width:120,require:true,align:'left'},
                       {field:'cs_value',title:'参数值',type:'string',width:120,require:true,align:'left'},
                       {field:'cs_Remark',title:'参数说明',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
